﻿Imports NHibernate.Cfg
Imports NHibernate.Validator.Cfg
Imports NHibernate.Validator.Engine
Imports NHibernate.Validator.Exceptions

Public Class NhibernateValidator
    Private Shared validator As ValidatorEngine
    Public Shared Function getValidator() As ValidatorEngine
        If validator Is Nothing Then
            validator = New ValidatorEngine()
            validator.Configure()
        End If
        Return validator
    End Function

    Public Shared Sub initValidator(ByRef cfg As Configuration)
        ValidatorInitializer.Initialize(cfg, getValidator)
    End Sub
End Class


